package com.laiketui.plugin.common.mapper;

import com.laiketui.plugin.common.domain.base.group.ActivityModel;
import com.laiketui.core.db.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * 营销活动
 *
 * @author Trick
 * @date 2023/3/22 15:19
 */
public interface ActivityModelMapper extends BaseMapper<ActivityModel> {


    //营销插件是否打开
    @Select("select count(1) from lkt_activity where store_id=#{storeId} and plug_type=#{pluginType} and is_display=1 and activity_type=1")
    int pluginSwitch(int storeId,int pluginType);

    @Select("select * from lkt_activity where store_id=#{storeId} and plug_type=#{pluginType} and is_display=1 and activity_type=1")
    ActivityModel getActivityModel(int storeId, int pluginType);

}